<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:p="http://primefaces.org/ui"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets">

<h:head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
</h:head>

<h:body>
	<ui:composition template="/XHTML/CommonColumnsContent.xhtml">
		<ui:define name="header">

		</ui:define>
		<br />
		<br />

		<ui:define name="body">
			<f:view>
				<p:ajaxStatus onstart="statusDialog.show();"
					onsuccess="statusDialog.hide();" />
				<p:dialog modal="true" widgetVar="statusDialog" header="Loading"
					draggable="false" closable="false" resizable="false">
					<p:graphicImage
						value="#{facesContext.externalContext.request.scheme}://#{facesContext.externalContext.request.serverName}:#{facesContext.externalContext.request.serverPort}#{facesContext.externalContext.request.contextPath}/images/ajaxloadingbar.gif" />
				</p:dialog>
				<h:form>
					<div align="center">
						<p:panel header="Inicio Sesión" style="width:450px">
						<p:messages id="msg" />						
						<br />
							<h:panelGrid id="pnlPrinc" columns="2" cellpadding="4" style="margin:0 auto;">
								<h:outputText value="Usuario" />
								<p:inputText binding="#{inicioView.txtUsuario}" />
								<h:outputText value="Contraseña" />
								<p:password binding="#{inicioView.txtContrasena}" />
							</h:panelGrid>
							<p:commandButton value="ingresar"
								action="#{inicioView.action_iniciarSesion}" update="pnlPrinc, msg" />
						</p:panel>						
					</div>
				</h:form>
			</f:view>
		</ui:define>
	</ui:composition>
</h:body>
</html>